{% extends "base.html" %}
{% block content %}
<div class="container mt-5">
    <div class="row justify-content-center">
        <div class="col-md-6">
            <div class="card">
                <div class="card-body">
                    <h3 class="card-title text-center mb-4">账户信息</h3>
                    <ul class="list-group list-group-flush mb-4">
                        <li class="list-group-item"><strong>用户名：</strong> {{ user.username }}</li>
                        <li class="list-group-item"><strong>当前余额：</strong> ¥{{ '%.2f'|format(user.current_balance) }}</li>
                    </ul>
                    <div class="d-grid gap-2">
                        <a href="{{ url_for('change_password') }}" class="btn btn-outline-primary">修改密码</a>
                        <form id="deleteAccountForm" action="{{ url_for('delete_account') }}" method="post" onsubmit="return confirm('确定要注销并永久删除该账户吗？此操作不可恢复！');">
    <button type="submit" class="btn btn-outline-danger">注销账户</button>
</form>
                    </div>
                </div>
            </div>
        </div>
    </div>
</div>
{% endblock %}
